package com.jdz.gxq.info.admin.inspectiondetail.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.jdz.gxq.info.admin.inspectiondetail.bo.Inspectiondetail;
import com.jdz.gxq.info.admin.inspectiondetail.form.EditInspectiondetailForm;
import com.jdz.gxq.info.admin.inspectiondetail.service.InspectiondetailService;
import com.jdz.gxq.info.common.action.CommonAction;

public class SaveInspectiondetailAction extends CommonAction {

	private InspectiondetailService inspectiondetailService = null;

	public ActionForward doExecute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws java.lang.Exception {

		EditInspectiondetailForm editInspectiondetailForm = (EditInspectiondetailForm) form;

		Inspectiondetail inspectiondetail = editInspectiondetailForm
				.getInspectiondetail();

		inspectiondetail.setModifiedBy(getUserId(request));

		inspectiondetailService.updateInspectiondetail(inspectiondetail);

		return mapping.findForward("success");
	}

	public void setInspectiondetailService(
			InspectiondetailService inspectiondetailService) {
		this.inspectiondetailService = inspectiondetailService;
	}
}
